package com.baishui.service.v5;

import com.baishui.beans.factory.annotation.Autowired;
import com.baishui.service.entity.v5.Car;
import com.baishui.service.entity.v5.House;
import com.baishui.stereotype.Component;
import test.v5.util.MessageTracker;

@Component(value = "baishuiAOP")
public class BaishuiV5Service {

    @Autowired
    private Car car;

    @Autowired
    private House house;

    public Car getCar() {
        return car;
    }

    public House getHouse() {
        return house;
    }

    public void placeOrder(){
        System.out.println("place order");
        MessageTracker.addMsg("place order");
    }

    public void placeOrderWithException(){
        throw new NullPointerException();
    }

}
